//
// CAudioCaptureFilter.h
//

#ifndef __H_CAudioCaptureFilter__
#define __H_CAudioCaptureFilter__

#include <afxtempl.h>
#include "CDXFilter.h"

class CAudioInput
{
public:
	CString   mInputName;
	IPin *    mInputPin;   // NOT outstanding reference

	CAudioInput() {};
	~CAudioInput() {};
};

typedef CList<CAudioInput, CAudioInput&>  INPUT_LIST;

class CAudioCaptureFilter : public CDXFilter  
{
private:
	char		mDeviceName[256];
	INPUT_LIST	mInputList;

public:
	CAudioCaptureFilter(IGraphBuilder * inGraph, const char * inDeviceName);
	virtual ~CAudioCaptureFilter(void);

	virtual BOOL CreateFilter(void);

	long GetConnectorCount(void);
	CString GetConnectorName(long inIndex);
	void SetConnector(long inIndex);
	long GetConnector(void);
	void SetMixLevel(double inLevel);

private:
	void SetDefaultInputPin(void);
	void SetCaptureBufferSize(void);

	void BuildInputList(void);
	IAMAudioInputMixer * GetMixer(IPin * inPin);
};

#endif // __H_CAudioCaptureFilter__
